package com.jdls.tanhua.dubbo.impl;

import com.jdls.tanhua.dubbo.AnnouncementApi;
import com.jdls.tanhua.dubbo.mapper.AnnouncementMapper;
import com.jdls.tanhua.pojo.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author 嘉德罗斯
 * @date 2021/11/1
 */
@DubboService
public class AnnouncementImpl implements AnnouncementApi {

    @Autowired
    private AnnouncementMapper announcementMapper;

    @Override
    public List<Announcement> findAll() {
        List<Announcement> announcements = announcementMapper.selectList(null);
        return announcements;
    }
}
